Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tutorial: How to make a 5-levels deep 1-tap shortcut to Google Precise Location Settings

31 views
Skip to first unread message

Wally J

unread,
Sep 10, 2023, 2:22:50 AM9/10/23
to
When you need to make a shortcut to an activity deep inside an app
(such as deep inside special Google settings), there are various
starting points based on how much information you know at the start.
a. You may somewhat know the package and activity name, or,
b. You may have no idea of the package & activity names, or,
c. Both the package & activity names may not be reachable from
the Android settings (but they're there... they're just hidden).

All three we can solve with a one-tap shortcut if you know how.

In this recent thread, I covered the starting point that you knew
the package name and you had some idea of the activity name.
*How to make a one-tap shortcut to your notification history*
<https://groups.google.com/g/comp.mobile.android/c/AkTqfiBUr1I>

Now I will show you how to create a shortcut when you have no
idea what the package or activity name is - but the activity
isn't hidden - so you can step down into the app to find it.

So this is the starting point for this tutorial.
a. You don't know what package the activity is located in
b. And you don't know the name of the activity you want to bring up
c. But you do know the five steps you need to do to get to it

No problem.

1. First, you need to figure out the unique package & activity name.
This is done by installing a shortcut inspector app, where I had
already on my system a shortcut inspector from my tests long ago.
Shortcut Widgets (+ Inspector) by Hamed Nikbakht
<https://play.google.com/store/apps/details?id=com.cemique.shortcutwidgets>
I just noticed it's no longer in the Google Play Store, so either
find an alternative or use a different app APK repository, such as
<https://apkamp.com/com.cemique.shortcutwidgets>
<https://m.apkpure.com/shortcut-widgets-inspector/com.cemique.shortcutwidgets>

2. Start Shortcut Widgets & Inspector & go to the "Inspect" tab.

3. In the "Inspect" tab tap the red "Start Inspecting" button.
This will report every public activity that draws on the screen

4. Press the round "Home" button on the bottom Android system bar.

5. Now go to the activity that is five levels deep in Settings!
a. Settings
b. Location
c. Location services
d. Google Location Accuracy
e. Improve Location Accuracy

6. Once the desired activity has drawn on your screen, you can now
go back to the Shortcut Widgets (+ Inspector) "Inspect" tab.

7. Press the three-line "Overview" button on the bottom Android system bar.

8. Select the "Shortcut Widgets (+ Inspector" background activity.

9. Note that you will see that you activated three activities
(where the first item will be launcher dependent)
a. One UI Home
com.sec.android.app.launcher/com.android.quickstep.RecentsActivity
b. Settings
com.android.settings/com.android.settings.homepage.SettingsHomepageActivity
c. Google Play services
com.google.android.gms/com.google.android.gms.location.settings.LocationAccuracyV31Activity

Voila! That last item is the unique package & activity name
which you didn't know at the start of this tutorial.

10. Tap on the last activity (i.e., on "Google Play services").

11. You'll get a summary and a "Test link" & "Add to shortcuts" option.

12. Press the "Test link" to confirm it brings up the correct activity.

13. Hit the "Back" button on the bottom Android system bar.

14. Again tap on the "Google Play services" option.

15. Click the "Add to shortcuts" option in Shortcut Widgets (+ Inspector).

16. Name it whatever you like (e.g., "precise location") & press "OK".

17. That does NOT put the shortcut on your homescreen unfortunately.
It only saves the shortcuts inside the app in the "Shortcuts" tab.

The task now is to put that shortcut on your homescreen.
But now you know two things you didn't know at the start.

Question = What is the unique package name?
Answer = com.google.android.gms

Question = What is the unique activity (aka class) name?
Answer = com.google.android.gms.location.settings.LocationAccuracyV31Activity

Note: We have _many_ options here, e.g., termux/adb will open shortcuts,
but we have to save a termux/adb script as a widget, not an icon.

Also the hide-and-seek method described in this thread will now
work because we finally know the package and activity name.
<https://groups.google.com/g/comp.mobile.android/c/AkTqfiBUr1I>

But another method is to simply manually create the shortcut,
now that you know the two most critical items (package & activity).

Below we will proceed to manually create a URL which we can then
turn into a shortcut to the "Improve Location Accuracy" activity.

18. To manually create that URL, you need to know the syntax. For that,
install Intents, by krow (free, adfree, gsffree, rated 3.9)
<https://play.google.com/store/apps/details?id=krow.dev.scheme>

19. Start "Intents" & press the (+) & enter the fields specified below.
Action: Select the radio dial for "ACTION.MAIN" & tap the back button
Package Name: com.google.android.gms
Class Name: com.google.android.gms.location.settings.LocationAccuracyV31Activity
Category: Select the checkbox for "CATEGORY.LAUNCHER" & tap "Choose"

20. To confirm the syntax is correct, tap the airplane icon at the
top right to open up the activity.
This should dive five levels deep to "Improve Location Accuracy"!
Press the back button to get back to the Intents setup.

21. Press the "X" button at the top left of the Intents GUI.
This will bring you to the "Favorites" and "History" tabs.

22. Tap the "History" tab to see the syntactically correct intent.

23. Longpress on the desired intent to get a half dozen choices.
Execute intent
Dive 5 levels deep to the "Improve Location Accuracy" activity
Edit alias
Allows you to create @alias but I have no idea how to use it
Copy uri text =>
#Intent;action=android.intent.action.MAIN;
category=android.intent.category.LAUNCHER;
package=com.google.android.gms;
component=com.google.android.gms/.location.settings.LocationAccuracyV31Activity;
end
Remove intent
Removes the intent from the "Intents" GUI
Create shortcut
I don't have any idea what this does as no shortcut is created
Favorite
Saves the intent into the "Intents" Favorites tab

24. Keep "Intents" in the background in case you need to recopy the URI.

25. Now we need to construct an HTTP URI to put into our shortcut.
For that, install "Instant Intent" freeware, by TrianguloY
<https://github.com/TrianguloY/intent>
<https://play.google.com/store/apps/details?id=com.trianguloy.instantintent>

26. With the URI in your clipboard, start "Instant Intent".

27. In the "intent uri" field of "Instant Intent", paste the URI above.

28. To confirm the syntax, tap "Open Intent" which should open the desired activity.

29. Press the topright back button of the "Improve Location Accuracy" activity.

30. That should bring you back to "Instant Intent".

31. Prepend the intent string with https://trianguloy.github.io/intent/
FROM: #Intent;action=...blah blah blah
TO: https://trianguloy.github.io/intent/#Intent;action=...blah blah blah

32. Confirm by pressing "Open Intent" which should open the desired intent.

33. Longpress on the URL and copy it into your clipboard and leave
"Instant Intent" running in the background (in case you need it).

34. Your final step is to turn that URL into a homescreen shortcut. For that,
download & install Shortcut To URL by Mio (free, ad free, rated 4.2)
<https://play.google.com/store/apps/details?id=jp.miotti.ShortcutToURL>

35. Start "Shortcut to URL" and give the shortcut any desired name and
paste the https://trianguloy... URL copied from "Instant Intent".

36. If desired, choose a custom icon for your new shortcut & press OK.

37. You can press "Add Automatically" but I'd suggest you longpress
on the icon in the middle to be able to drag and drop to the
desired shortcuts folder on your homescreen dock.

38. Test your new homescreen shortcut by tapping on it.

Voila!

You now have a one-tap shortcut that dives five levels deep into
Settings which - get this - is no longer in the settings package
as it switches over to a special Google-only settings package
(which isn't part of the normal Android settings!) to bring up
the "Google Location Accuracy" "Improve Location Accuracy" activity!

As always, if you know more than I do on this topic, please add value
because this is four steps where I wish I could make it simpler.

Note: I repeat you can use the previous lookup method; but the
goal in this tutorial was the difficult case of creating a shortcut
manually without knowing (at the start) the package or activity.

Wally J

unread,
Sep 23, 2023, 6:37:52 PM9/23/23
to
Moments ago in this thread, TheRealBev discussed "Roaming" settings.
<https://groups.google.com/g/comp.mobile.android/c/O0d4QrG8K94/m/MvfXCcaHAgAJ>

I just made a one-tap shortcut to the Galaxy setting for Roaming=on/off.
<https://i.postimg.cc/yx1yKMTJ/roaming-shortcut.jpg>

Note that this activity is NOT found in the Android settings package!
(So you need to know more about the name in order to make a shortcut).

Keeping in mind there are many ways to create a 1-tap shortcut.
Each one-tap shortcut may have slightly different circumstances.

Which means you need to be intelligent about creating that shortcut.
Here is what I just did to create that one-tap shortcut to roaming.

1. Use Shortcut Widgets (+ Inspector) by Hamed Nikbakht to find
a. unique package name = com.samsung.android.app.telephonyui
b. unique activity name = .netsettings.ui.NetSettingsActivity

Note this is a different package than the typical Android settings.

2. Start App Manager by Muntashir Akon & search for what you found
Search for "com.samsung.android.app.telephonyui" & tap the result
which brings up the "Call Settings" app to the "App Info" tab.

Tap on the "Activities" tab and scroll down to where you see
"Mobile networks" for "com.samsung.android.app.telephonyui".

Then tap on the blue "Create Shortcut" button.
Optionally edit the icon image and name as desired.
Place onto your homescreen as desired.

Note that the package is colloquially called "Call Settings"
(and note that this package may be unique to Samsung devices).

3. To test, tap on that newly created homescreen shortcut.
Voila!
This will bring you directly to the roaming on/off activity!
com.samsung.android.app.telephonyui.netsettings.ui.NetSettingsActivity
<https://i.postimg.cc/yx1yKMTJ/roaming-shortcut.jpg>

SOFTWARE REQUIRED FOR THIS TUTORIAL:
*App Manager* - Android package manager by Muntashir Akon
The best full-featured open-source package manager for Android.
Free, adfree, gsffree, not available on the Google Play Store repo!
<https://github.com/MuntashirAkon/AppManager>
<https://muntashirakon.github.io/AppManager/en/>
<https://f-droid.org/packages/io.github.muntashirakon.AppManager/>
--
I'm on Usenet to be purposefully helpful to anyone who asks for help.

Wally J

unread,
Sep 23, 2023, 8:21:58 PM9/23/23
to
Wally J <walte...@invalid.nospam> wrote

> I just made a one-tap shortcut to the Galaxy setting for Roaming=on/off.
> <https://i.postimg.cc/yx1yKMTJ/roaming-shortcut.jpg>

Another easy way to make a one-tap shortcut to the roaming settings is
to create that one-tap shortcut using the FOSS Activity Manager by sdex.

0. As before, use Shortcut Widgets (+ Inspector) by Hamed Nikbakht to find
a. unique package name = com.samsung.android.app.telephonyui
b. unique activity name = .netsettings.ui.NetSettingsActivity

Note this is a different package than the typical Android settings.
It seems to be a Samsung-specific package outside of Android settings.

1. Start the "Activity Manager" app, making sure in its settings
that "Show system apps" is turned on & then search for keywords
(or scroll down to the "Call settings" listing which you learned
was where the on/off switch for Roaming was in the prior post.

2. Press on the sdex FOSS Activity Manager entry for
"Call Settings (com.samsung.android.app.telephonyui)" and scroll
to the activity previously reported by the Activity Inspector.
"NetSettingsActivity Mobile networks (.netsettings.ui.NetSettingsActivity)"

3. Press the threedots and then "Create shortcut" in the resulting menu.
Optionally edit the icon image and name as desired.
Place onto your homescreen as desired.

Voila!
You've just created a 1-tap shortcut to the roaming = on/off activity.

SOFTWARE:
Activity Manager - hidden activity launcher 2.4.1 by sdex (free, adware
Activity Manager (former Activity Runner) - hidden activity launcher
<https://github.com/sdex/ActivityManager>
<https://forum.xda-developers.com/t/app-4-0-activity-manager-former-activity-runner-hidden-activity-launcher.3797985/>
<https://github.com/sdex/ActivityManager/releases/tag/5.4.2>

Shortcut Widgets (+Inspector) no longer on Google Play Store as of 8/2023)
<https://play.google.com/store/apps/details?id=com.cemique.shortcutwidgets>
<https://apkcombo.com/shortcut-widgets-inspector/com.cemique.shortcutwidgets/>
<https://m.apkpure.com/shortcut-widgets-inspector/com.cemique.shortcutwidgets>
0 new messages